﻿<%@ Page Title="" Language="C#" MasterPageFile="~/member/mMenber.master" AutoEventWireup="true" CodeBehind="FramePage.aspx.cs" Inherits="map.member.dialogs.FramePage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head2" runat="server">  
    <link href="../../outstyle.css" rel="stylesheet" type="text/css" />
     <link href="../../Stylesheet1.css" rel="stylesheet" type="text/css" />
    <script src="../../js/dropdowncontent.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder3" runat="server">
    <iframe id="CateOprFrame" name="CateOprFrame" frameborder="0"   width="100%"  scrolling="no" >
    </iframe>
    <script type="text/javascript">
        function initFrame() {
            var frameObj = document.getElementById("CateOprFrame");
            var type = getQueryString("type");
            if (type != "") {
                var redirecturl = "";
                if (type == "cateitem") {
                    redirecturl = "ItemSeller_cateitem.aspx?";
                    var itemcateid = getQueryString("itemcateid");
                    if (itemcateid != "") {
                        redirecturl += "itemcateid=" + itemcateid;
                    }
                    var parentcid = getQueryString("parentcid");
                    if (parentcid != "") {
                        if (itemcateid != "")
                            redirecturl += "&";
                        redirecturl += "parentcid="+parentcid ;
                    }
                }
                if (redirecturl != "")
                    frameObj.src = redirecturl;
            }
        }

        window.onload = function() {
            initFrame();
        }

        function getQueryString(queryName) {
            var queryValue = "";
            var queryFound = false;
            if (window.location.search != "") {
                var search = window.location.search;
                var i = 0;
                while (i <= search.length) {
                    start = i;
                    end = start + queryName.length;
                    if (search.substring(start, end) == queryName) {
                        queryFound = true;
                        break;
                    }
                    i++;
                }
                if (queryFound) {
                    start = end + 1;
                    end = search.indexOf("&", start);
                    if (end < start)
                        end = search.length;
                    var getvalue = search.substring(start, end);
                    return unescape(getvalue);
                }
            }
            return queryValue;
        }
    </script>
</asp:Content>
